<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>首页</title>
    <th:block th:replace="/backstage/common_resources::common_css"/>
    <th:block th:replace="/backstage/common_resources::common_js"/>
</head>
<body class="hold-transition skin-purple sidebar-mini">
<div class="wrapper">
    <!-- 页面头部，common_header代表引入文件名，header代表引入部分，~{}代表文件在resources目录下 -->
    <header th:replace="~{/backstage/common_header::header}"></header>
    <!-- 导航侧栏 -->
    <aside th:replace="~{/backstage/common_aside::aside}"></aside>
    <!-- 内容区域 -->
    <div class="content-wrapper">

        <!-- 内容头部 -->
        <section class="content-header">
            <h1>
                产品管理
                <small>添加产品</small>
            </h1>
            <ol class="breadcrumb">
                <li><a th:href="@{/backstage/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a th:href="@{/backstage/product/all}">产品管理</a></li>
                <li class="active">添加产品</li>
            </ol>
        </section>
        <!-- 内容头部 /-->

        <!-- 正文区域 -->
        <section class="content">
            <form th:action="@{/backstage/product/add}" method="post">
                <div class="row data-type">

                    <div class="col-md-2 title">产品名</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="产品名" name="productName" value="">
                    </div>
                    <div class="col-md-2 title">类型</div>
                    <div class="col-md-4 data">
                        <select class="form-control" name="cid">
                            <option th:each="category:${categoryList}"
                                    th:value="${category.cid}"
                                    th:text="${category.cname}">
                            </option>
                        </select>
                    </div>

                    <div class="col-md-2 title">价格</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="价格" name="price" value="">
                    </div>

                    <div class="col-md-2 title">热线</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="热线" name="hotline" value="">
                    </div>

                    <div class="col-md-2 title">状态</div>
                    <div class="col-md-4 data">
                        <select class="form-control" name="status">
                            <option value="true">开启</option>
                            <option value="false">关闭</option>
                        </select>
                    </div>

                    <div class="col-md-2 title"></div>
                    <div class="col-md-4 data"></div>

                    <div class="col-md-2 title" style="height: 350px">描述</div>
                    <div class="col-md-10 data" style="height: 350px">
                        <textarea class="form-control" name="productDesc" value=""
                                  style="width: 100%;height: 100%"></textarea>
                    </div>

                    <div class="col-md-2 title"></div>
                    <div class="col-md-10 data text-center">
                        <button type="submit" class="btn bg-maroon">保存</button>
                        <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
                    </div>

                </div>
            </form>
        </section>
        <!-- 正文区域 /-->

    </div>

    <!-- 底部导航 -->
    <footer th:replace="~{/backstage/common_footer::footer}"></footer>
</div>
</body>
</html>
